home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 97 / CD-ROM 97 / CD-ROM 97.iso / jogos / spherical / Code / Library / neurosis.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-08-14  |  4.4 KB  |  168 lines

  1.  
  2. // Copyright (C) 2002 by Luigi Pino.  All Rights Reserved.
  3.  
  4. /***************************************************************************/
  5.  
  6. #ifndef _neurosis_h_
  7. #define _neurosis_h_
  8.  
  9. #include <windows.h>                                                                    // Windows
  10. #include <gl\gl.h>                                                                        // OpenGL32
  11. #include <gl\glu.h>                                                                        // GLu32
  12. #include <gl\glaux.h>                                                                    // Glaux
  13. #include <crtdbg.h>                                                                        // Debug
  14. #include <math.h>                                                                            // Math
  15. #include <regstr.h>                                                                        // Registry
  16. #include <stdio.h>                                                                        // Standard Input/Output
  17. #include <time.h>                                                                            // Timer
  18.  
  19. /***************************************************************************/
  20.  
  21. // Colors
  22. #define        R_1                                        1.0f
  23. #define        G_1                                        1.0f
  24. #define        B_1                                        1.0f
  25. #define        R_2                                        0.0f
  26. #define        G_2                                        0.0f
  27. #define        B_2                                        0.0f
  28. #define        R_3                                        0.1176f
  29. #define        G_3                                        0.5608f
  30. #define        B_3                                        0.9961f
  31. #define        R_4                                        0.7921f
  32. #define        G_4                                        0.0078f
  33. #define        B_4                                        0.0078f
  34. #define        R_5                                        0.9804f
  35. #define        G_5                                        0.9294f
  36. #define        B_5                                        0.0f
  37. #define        R_6                                        0.8235f
  38. #define        G_6                                        0.8392f
  39. #define        B_6                                        1.0f
  40. #define        R_7                                        0.8863f
  41. #define        G_7                                        0.1098f
  42. #define        B_7                                        0.0f
  43. #define        R_8                                        0.0706f
  44. #define        G_8                                        0.8431f
  45. #define        B_8                                        0.0039f
  46. #define        R_9                                        0.0f
  47. #define        G_9                                        0.1216f
  48. #define        B_9                                        0.9333f
  49. #define        R_10                                    0.6275f
  50. #define        G_10                                    0.6275f
  51. #define        B_10                                    0.6275f
  52. #define        R_11                                    0.1765f
  53. #define        G_11                                    0.1843f
  54. #define        B_11                                    0.5176f
  55. #define        R_12                                    0.7490f
  56. #define        G_12                                    0.5020f
  57. #define        B_12                                    0.5020f
  58. #define        R_13                                    0.5647f
  59. #define        G_13                                    0.5961f
  60. #define        B_13                                    0.7490f
  61.  
  62. // Textures
  63. #define        t_font                                0
  64. #define        t_font_mask                        1
  65.  
  66. /***************************************************************************/
  67.  
  68. typedef struct {
  69.     float    r;
  70.     float    g;
  71.     float    b;
  72. } color3;
  73.  
  74. /***************************************************************************/
  75.  
  76. typedef struct {
  77.     float    x;
  78.     float    y;
  79. } float2;
  80.  
  81. /***************************************************************************/
  82.  
  83. typedef struct {
  84.     float    x;
  85.     float    y;
  86.     float    z;
  87. } float3;
  88.  
  89. /***************************************************************************/
  90.  
  91. typedef struct {
  92.     int    x;
  93.     int    y;
  94. } int2;
  95.  
  96. /***************************************************************************/
  97.  
  98. typedef struct {
  99.     int x;
  100.     int    y;
  101.     int    z;
  102. } int3;
  103.  
  104. /***************************************************************************/
  105.  
  106. typedef struct {
  107.     float        bottom;                                                                            // Closest point distance to bottom of light
  108.     float        brightness;                                                                    // Brightness of light
  109.     float        distance[179][360];                                                    // Closest point distance
  110.     float        range;                                                                            // Range of influence
  111.     float        top;                                                                                // Closest point distance to top of light
  112.     float3    position;                                                                        // Position
  113. }    Shadow_Sphere_Struct;
  114.  
  115. /***************************************************************************/
  116.  
  117. typedef struct {
  118.     float3    top_upper[13];
  119.     float3    top_lower[13];
  120.     float3    middle[13];
  121.     float3    bottom_upper[13];
  122.     float3    bottom_lower[13];
  123. }    Sphere_Struct;
  124.  
  125. /***************************************************************************/
  126.  
  127. float Cos_F(float angle);
  128.  
  129. float Cos_I(int angle);
  130.  
  131. void Fix_Angle(float *angle);
  132.  
  133. float Get_Angle_2D(float3 *from, float3 *to);
  134.  
  135. float Get_Distance(float3 *from, float3 *to);
  136.  
  137. float Get_Random(float number_amount);
  138.  
  139. void Get_Rotation_Angle(float *angle_current, float angle_dest, float *increment);
  140.  
  141. void Initialize_Angles();
  142.  
  143. void New_Length_2D(float3 *base, float3 *point, float length);
  144.  
  145. void Rotate_x(float3 *base, float3 *point, float amount);
  146.  
  147. void Rotate_y(float3 *base, float3 *point, float amount);
  148.  
  149. void Rotate_z(float3 *base, float3 *point, float amount);
  150.  
  151. float Sin_F(float angle);
  152.  
  153. float Sin_I(int angle);
  154.  
  155. /***************************************************************************/
  156.  
  157. #include "vector.h"
  158. #include "collide.h"
  159. #include "debug.h"
  160. #include "input.h"
  161. #include "camera.h"
  162. #include "linked_lists.h"
  163. #include "menu.h"
  164. #include "polygon.h"
  165. #include "window.h"
  166. #endif
  167.  
  168. /***************************************************************************/